<template>
  <div class="model-page">
    <div class="page-full-activityDetail">
      <!-- 顶部 -->
      <topHeader title="活动详情"></topHeader>

      <div class="coupon_wrapper">
        <h3 class="c_titile">{{data_page.name}}</h3>
        <div class="c_main">
          <p class="p0">立减</p>
          <p class="price"><sub>￥</sub><strong>{{parseInt(data_page.money)}}</strong></p>
          <p class="p1">首单特权</p>
        </div>
      </div>

      <div class="cover_wrapper">
          <div class="c_top"></div>
          <div class="c_main">
            <div class="btn" @click="toAskTeacher(data_page.money,data_page.id)">立即咨询</div>
            <div class="copy">
              <p>活动最终解释权归重庆易可达文化传播有限公司所有，</p>
              <p>如有疑问，可咨询电话：023-86866101</p>
            </div>
          </div>
      </div>

    </div>

  </div>
</template>

<script>
import topHeader from '@/components/topHeader'
export default {
  components:{
    topHeader,
  },
  data() {
    return {
      data_page:{},
    };
  },
  created() {
    this.$store.commit('changePageLoading',true);
    this.fetch_page();
  },
  methods: {
    fetch_page(){
      let id = this.$route.query.id;
      let uid =this.$store.state.userID || '866472034154769,866472034358089';
      this.$fetch.post('/app/Jmyc/activity_detail',{'id':id,'device':uid}).then((res)=>{
        if(res.code==200){
          this.data_page = res.data;
          this.$store.commit('changePageLoading',false);
        }
      });
    },
    // 路由至问大师
    toAskTeacher(money,id){
      this.$router.push({
        path:'/askTeacher',
        query:{
          'isMiddlePage':1,
          'money':money,
          'id':id
        }
      });
    }
  }
};
</script>

<style lang="less">
@import "../../assets/css/public.less";
@import "../../assets/css/tml_base.less";
@import "./index.less";
</style>